﻿using System;
using System.Web;
using NativeCode.Core.Data;
using NativeCode.Web.Controls.Filters;

namespace SampleWebApp
{
	public class Global : HttpApplication
	{
		protected void Application_Start(object sender, EventArgs e)
		{
			AppDomain.CurrentDomain.SetData("SQLServerCompactEditionUnderWebHosting", true);
			// Apparently, looking at the Assembly.GetExecutingAssembly() just isn't enough
			// for the DataContractSerializer...
			FilterableTypesRegistry.AutoCreateFiltersFromAppDomain(AppDomain.CurrentDomain);
		}

		protected void Session_Start(object sender, EventArgs e)
		{
		}

		protected void Application_BeginRequest(object sender, EventArgs e)
		{
		}

		protected void Application_AuthenticateRequest(object sender, EventArgs e)
		{
		}

		protected void Application_Error(object sender, EventArgs e)
		{
		}

		protected void Session_End(object sender, EventArgs e)
		{
		}

		protected void Application_End(object sender, EventArgs e)
		{
		}
	}
}